﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Security;

namespace ExcelRefresh
{
    public class ConsoleListenerEx : TraceListener
    {
        public ConsoleListenerEx()
        {
        }

        public ConsoleListenerEx(string logType)
        {
        }

        public override void Write(string message)
        {
            if (message.EndsWith(": 0 : ")) return;
            Console.Write(message);
        }

        public override void WriteLine(string message)
        {
            Console.WriteLine(message);
        }

        public override void WriteLine(string message, string category)
        {
            Console.WriteLine("{0} : {1}", category, message);
        }

        public override void Fail(string message)
        {
            Console.WriteLine("Error : {0}", message);
        }

        public override void Fail(string message, string detailMessage)
        {
            Console.WriteLine("Error : {0}{1}{2}", message, Environment.NewLine, detailMessage);
        }
    }
}